<template>
    <div class="allDownload">
        <van-tabs swipeable color="rgb(206, 153, 64)" :line-width="50" @change="onChange">
            <van-tab title="全部资料">
                <search-box class="search-view"/>
                <download-list :list="dataList" @onclick="handleItemClick"/>
            </van-tab>
            <van-tab title="高端论坛资料">
                <search-box class="search-view"/>
                <download-list :list="dataList" @onclick="handleItemClick"/>
            </van-tab>
            <van-tab title="专家讲坛资料">
                <search-box class="search-view"/>
                <download-list :list="dataList" @onclick="handleItemClick"/>
            </van-tab>
            <van-tab title="其他资料">
                <search-box class="search-view"/>
                <download-list :list="dataList" @onclick="handleItemClick"/>
            </van-tab>
        </van-tabs>
    </div>
</template>
<style lang="less" scoped>
    @import '../../style/variable';
    .allDownload {
        .list {
            background-color: @color-white;
            padding-left: 1.5rem;
            &-item {
                border-bottom: 1px solid rgba(0,0,0,.1);
                padding: 1rem 0.7rem 1.9rem 0;
                display: flex;
                flex-direction: column;
                .top{
                    color: #333E48;
                    font-size: 1.5rem;
                    font-weight: 500;
                    margin-bottom: 1.3rem;
                }
                .bottom{
                    display: flex;
                    align-items: center;
                    .left {
                        width: 6.9rem;
                        height: 6.9rem;
                        margin-right: 1.1rem;
                        img {
                            height: 100%;
                        }
                    }
                    .right{
                        width: 100%;
                        display: flex;
                        flex-direction: column;
                        justify-content: center;
                        font-size: 1.3rem;
                        img {
                            height: 1.4rem;
                            margin-right: 0.7rem;
                        }
                        .last {
                            width: 100%;
                            display: flex;
                            justify-content: space-between;
                            align-items: flex-end;
                            .btn {
                                display: flex;
                                align-items: center;
                                padding: 0.6rem;
                                border: 1px solid #949494;
                                border-radius: 0.3rem;
                                color: #7A7A7A;
                                img{
                                    margin-right: 0.5rem;
                                }
                            }
                            .radius {
                                font-size: 1.2rem;
                                color: #097FFF;
                                border-radius: 1.4rem;
                                background-color: #F0F0F7;
                                padding: 0.7rem 1.5rem;
                            }
                        }
                        .center{
                            display: flex;
                            align-items: center;
                        }
                        .mb12 {
                            margin-bottom: 1.2rem;
                        }
                    }
                }
            }
        }
    }
</style>
<style lang="less">
    @import '../../style/variable';
    .allDownload {
        padding-top: 0;
        .van-tabs__wrap, .van-tabs__nav{
            height: 4.3rem;
        }
        .van-tab{
            line-height: 1.5rem;
            font-size: 1.4rem;
            padding: 1.4rem 0.3rem;
            min-width: 9rem;
        }
        .van-tabs__content {
            padding-top: 2.8rem;
        }
    }
</style>
<script>
    import {Tab, Tabs} from 'vant';
    export default {
        components: {
            [Tab.name]: Tab,
            [Tabs.name]: Tabs,
        },
        data() {
            return {
                tabs: ['全部资料', '高端论坛资料', '专家讲坛资料', '其他资料'],
                dataList: [
                    {
                        title: '大金所·大固收同业沙龙(第一期)——5月勇征小黄山同业徒步交流活动圆满结束',
                        name: '天风证券债券研究孙彬彬团队',
                        number: '234',
                        date: '2018.12.14-2018.12.16',
                        state: '免费'
                    },
                    {
                        title: '房地产“真股权投资”产品设计、投前尽调与投后管理全流程解析',
                        name: '孙彬彬',
                        number: '2341',
                        date: '2018.12.14-2018.12.16',
                        state: '6.99'
                    },
                    {
                        title: '房地产“真股权投资”产品设计、投前尽调与投后管理全流程解析',
                        name: '中信证券',
                        number: '114',
                        date: '2018.12.14-2018.12.16',
                        state: '7.99'
                    },
                    {
                        title: '房地产“真股权投资”产品设计、投前尽调与投后管理全流程解析',
                        name: '中信证券',
                        number: '114',
                        date: '2018.12.14-2018.12.16',
                        state: '7.99'
                    },
                    {
                        title: '房地产“真股权投资”产品设计、投前尽调与投后管理全流程解析',
                        name: '中信证券',
                        number: '114',
                        date: '2018.12.14-2018.12.16',
                        state: '7.99'
                    },
                ]
            }
        },
        methods: {
            onChange(index) {
                console.log('index', index);
            },
            handleItemClick(id) {
                this.$router.push('/think/allDownload?id=' + id);
            }
        }
    }
</script>